<include file="application/walletadmin/view/public/left.html"/>
<div id="dcMain">
   <!-- 当前位置 -->
<div id="urHere">管理中心<b>></b><strong>添加文章</strong> </div>   <div class="mainBox" style="height:auto!important;height:550px;min-height:550px;">
            <h3><a href="{:U('Art/index')}" class="actionBtn">文章列表</a>添加文章</h3>
    <form action="{:U('Art/details')}" method="post" enctype="multipart/form-data">
     <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
     
      <tr>
       <td width="90" align="right">文章分类：</td>
       <td>
       		<select name="class_id">
       		<volist name="class" id="v">
       			<option value="{$v.class_id}" <if condition="$list.type eq $v.class_id">selected</if>>{$v.name}</option> 
       		</volist>
       		</select>
       </td>
      </tr>
      
      <tr>
      	<td width="90" align="right">首页显示：</td>
      	<td>
      		<input type="radio" value="0" name="top" id="0" <if condition= "$list.top eq 0">checked="checked"</if>/>否
			<input type="radio" value="1" name="top" id="1"	<if condition= "$list.top eq 1">checked="checked"</if>/>是
      	</td>
      </tr>
      <tr>
      	<td width="90" align="right">排序：</td>
      	<td>
      		<input type="text" name='sort' value="{$list.sort}" size="80" class="inpMain">
      	</td>
      </tr>
      
      <tr>
       <td width="90" align="right">标题：</td>
       <td>
        <input type="text" id="title" name="title" value="{$list.title}" size="80" class="inpMain" />
         <input  name="article_id"  value="{$list.article_id}" type="hidden"></td>
       </td>
      </tr>
      
      <tr>
      	<td width="90" align="right">封面图片：</td>
      	<td>
      		<img style=" width:400px; padding-left:120px;" src='{$list.pic}' />
      	</td>
      </tr>
      <tr>
       <td width="90" align="right">上传图片：</td>
       <td>
       		<input type="file" name="pic" value="{$list.pic}" >
       </td>
      </tr>
      
      <tr>
       <td align="right" valign="top">文章描述：</td>
       <td>
        <!-- KindEditor -->
        <link rel="stylesheet" href="__PUBLIC__/app/admin/js/kindeditor/themes/default/default.css" />
        <link rel="stylesheet" href="__PUBLIC__/app/admin/js/kindeditor/plugins/code/prettify.css" />
        <script charset="utf-8" src="__PUBLIC__/app/admin/js/kindeditor/kindeditor.js"></script>
        <script charset="utf-8" src="__PUBLIC__/app/admin/js/kindeditor/lang/zh_CN.js"></script>
        <script charset="utf-8" src="__PUBLIC__/app/admin/js/kindeditor/plugins/code/prettify.js"></script>
        <script>
          KindEditor.ready(function(K) {
            var editor1 = K.create('textarea[name="content"]', {
              cssPath : '../plugins/code/prettify.css',
              uploadJson : '../php/upload_json.php',
              fileManagerJson : '../php/file_manager_json.php',
              allowFileManager : true,
              afterCreate : function() {
                var self = this;
                K.ctrl(document, 13, function() {
                  self.sync();
                  K('form[name=example]')[0].submit();
                });
                K.ctrl(self.edit.doc, 13, function() {
                  self.sync();
                  K('form[name=example]')[0].submit();
                });
              }
            });
            prettyPrint();
          });
      </script>
        <!-- /KindEditor -->
        <textarea id="content" name="content" style="width:780px;height:400px;" class="textArea">{$list.content}</textarea>
       </td>
      </tr>
      <tr>
       <td></td>
       <td>
        <input name="submit" class="btn" type="submit" value="提交" />
       </td>
      </tr>
     </table>
    </form>
       </div>
 </div>
 <div class="clear"></div>
<include file="application/walletadmin/view/public/foot.html"/><!-- dcFooter 结束 -->
<div class="clear"></div> </div>
 <script type="text/javascript">
 
 onload = function()
 {
   document.forms['action'].reset();
 }

 function douAction()
 {
     var frm = document.forms['action'];

     frm.elements['new_cat_id'].style.display = frm.elements['action'].value == 'category_move' ? '' : 'none';
 }
 
 </script>
</body>
</html>